//
//  DBJDoctorListForAttentionCell.m
//  DBJ
//
//  Created by 简楚君 on 2016/11/13.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import "DBJDoctorListForAttentionCell.h"
#import <UIImageView+WebCache.h>
@interface DBJDoctorListForAttentionCell()

/**
 头像
 */
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
/**
 姓名
 */
@property (weak, nonatomic) IBOutlet UILabel *name;
/**
 工作职位
 */
@property (weak, nonatomic) IBOutlet UILabel *position;
/**
 工作单位
 */
@property (weak, nonatomic) IBOutlet UILabel *workplace;

@property (weak, nonatomic) IBOutlet UILabel *add;

@property (weak, nonatomic) IBOutlet UILabel *flowers;

@property (weak, nonatomic) IBOutlet UILabel *banner;
@end

@implementation DBJDoctorListForAttentionCell

-(void)dbjSetupUI{
    [super dbjSetupUI];
}

-(void)setDocModel:(DBJDocListModel *)docModel{
    _docModel = docModel;
    self.banner.text = docModel.banner;
    self.flowers.text = docModel.flower;
    self.add.text = docModel.operation_count;
    self.name.text = docModel.doctor_name;
    self.position.text = docModel.doctor_title_name;
    if (docModel.hospital_name) {
        self.workplace.text = docModel.hospital_name;
    }else
    {
        self.workplace.text = docModel.doctor_hospital_name;
    }
    
    NSURL *url = [NSURL URLWithString:docModel.doctor_portrait];
    [self.iconImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"doctor_defaultphoto_male"]];
}

@end
